Replication code and data for "Gender, Generation, and Multiracial Identification in the United States" by Janet Xu, Aliya Saperstein, Ann Morning, and Sarah Iverson

The public-use data and questionnaire from Pew's 2015 Survey of Multiracial Adults can be downloaded here: https://www.pewresearch.org/social-trends/dataset/survey-of-multiracia-adults/

The replication package contains the following additional files:  

- Data-related files:

    -  "Note on Prior Data Cleaning.txt": Describes new variables created from the public-use dataset along with our review and recoding of respondents’ self-identification based on restricted-use data made available to the authors by Pew Research Center.
    
    -  "new_variables.csv": When merged with the public-use dataset found on Pew Research Center's website, this will recreate the dataset we used for analysis. It includes our initial recoding of key race variables.
    
    -  "recoded_cases.csv": Shows which verbatim write-in responses from the restricted-use version of the Pew Survey of Multiracial Adults were recoded. These cases fell into three types: 1) single-race responses that were recoded to multiple-race responses, 2) multiple-race responses that were recoded to single-race responses, and 3) multiple-race responses for which we edited the summary variable representing all official Office of Management and Budget (OMB) race categories that describe the respondent.
    

- Code files:

    - Tables.Rmd 

    - Figures.Rmd

    - Appendix_all.Rmd
    

The code was last run on macOS High Sierra Version 10.13.6, RStudio Version 1.2.5001 and R 4.1.0